package DataBase;


import java.util.HashSet;
import java.util.Set;
 
/**
* Description : the connect to DB with the filed DB:
* <p>
*
*@author Danielle
*/
public class FileDB implements java.io.Serializable {
	private static final long serialVersionUID = 1L;
    private long fileId=0;
    private String fileName=null;
    private Set<TagDB> tags = new HashSet<TagDB>(0);
    
	/**
	* Description Ctor
	*/
    public FileDB() {
    }
    
	/**
	* Description Ctor 
	* @param String fileName
	*/
    public FileDB(String fileName) {
        this.fileName = fileName;
    }
    
	/**
	* Description Ctor
	* @param String fileName
	* @param Set<TagDB> tags
	*/
    public FileDB(String fileName, Set<TagDB> tags) {
        this.fileName = fileName;
        this.tags = tags;
    }
    
	/**
	* Description getFileId
	* @return long
	*/
    public long getFileId() {
        return this.fileId;
    }
    
	/**
	* Description setFileId
	* @param long
	*/
    public void setFileId(long fileId) {
        this.fileId = fileId;
    }
    
	/**
	* Description getfileName
	* @return String
	*/
    public String getfileName() {
        return this.fileName;
    }
    
	/**
	* Description setFileName
	* @param String fileName
	*/
    public void setFileName(String fileName) {
        this.fileName = fileName;
    }
    
	/**
	* Description getTags
	* @return Set<TagDB>
	*/
    public Set<TagDB> getTags() {
        return this.tags;
    }
    
	/**
	* Description setTags
	* @param Set<TagDB> tags
	*/
    public void setTags(Set<TagDB> tags) {
        this.tags = tags;
    }
    
	/**
	* Description hashCode
	* @return int
	*/
    public int hashCode() {
	        int hash = 0;
	        hash += (fileName != null ? fileName.hashCode() : 0);
	        return hash;
    }
    
	/**
	* Description equals
	* @param Object object
	* @return boolean
	*/
    @Override
    public boolean equals(Object object) {

		if (this == object)
			return true;
		if (object == null)
			return false;
		if (getClass() != object.getClass())
			return false;
		FileDB other = (FileDB) object;
		if (fileName == null) {
			if (other.fileName != null)
				return false;
		} 
		else if (!fileName.equals(other.fileName))
			return false;
		return true;
	}


}